<?php
/**
 * Description of BackendRecursosForm
 *
 * @author rmariano
 */
class BackendRecursosForm extends RecursoForm
{
    
    public function configure()
    {
        parent::configure();
        //$this->setWidgets(array(parent::getWidgetSchema(),'capacidad' => new sfWidgetFormInputText()));
        $r = $this->getObject()->getClaseRecurso();
        //if($r == 'A') {
            $this->addSubForms();
        //}
    }
    private function addSubForms()
    {
        $subFormulario = new sfForm();
        $aula = new Aula();
        $aula->setIdRecurso($this->getObject()->getIdRecurso());
        $form = new AulaForm($aula);

        $subFormulario->embedForm('a',$form);
        $this->embedForm('a',$subFormulario); //$form);
    }
}
?>
